package main

import "fmt"

func basename(s string) string {
	for i := len(s) - 1; i > 0; i-- {
		if (s[i] == '/') {
			s = s[i+1:]
			break
		}
	}
	
	return s
}

func main()  {
	var path string

	fmt.Printf("请输入字符串：")
	fmt.Scan(&path)

	sPath:=basename(path)

	fmt.Printf("结果：%s", sPath)
}